import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '@/views/index'
import Detail from '@/views/detail'
import Search from '@/views/search'
import AddMe from '@/views/add'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: Index,
        name: 'index'
    },
    {
        path: '/detail/:id',
        component: Detail,
        name: 'detail'
    },
    {
        path: '/search',
        component: Search,
        name: 'search'
    },
    {
        path: '/addMe',
        component: AddMe,
        name: 'addMe'
    }
]

const router = new VueRouter({
    routes
  })

export default router